package org.visionlibrary.image.model;


public class LUTFilter extends PixelFilter {
	protected int[] lut = null;

	public LUTFilter(int[] lut) throws NullPointerException {
		if (lut == null)
			throw new NullPointerException("lut can't be null");

		this.lut = lut;
		for (int i = 0; i < lut.length; i++)
			lut[i] = normalization.normalize(lut[i]);
	}

	protected int getNewPixelVal(int value) {
		return lut[value];
	}
}
